<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="项目还款记录">
                    <#include "banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">

                            <div class="toolbor-module search">
                                <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                            </div>

                            <div class="toolbor-module search">
                                <div class="formTit">状态：</div>
                                <div class="select-box" id="status">
                                    <div class="tag-select">全部</div>
                                    <ul class="tag-options">
                                        <li data-value="">全  部</li>
                                        <li data-value="1">待还款</li>
                                        <li data-value="2">部分还款</li>
                                        <li data-value="3">还款成功</li>
                                    </ul>
                                </div>
                            </div>

                            <div class="toolbor-module search">
                                <div class="formTit">资产管理公司：</div>
                                <div class="select-box" id="fid">
                                    <div class="tag-select">全部</div>
                                    <ul class="tag-options">
                                        <li data-value="">全部</li>
                                        <#if fList??> <#list fList as item>
                                            <li data-value="${item.id?c}">${item.name}</li>
                                        </#list> </#if>
                                    </ul>
                                </div>
                            </div>

                            <div class="toolbor-module search">
                                <div class="formTit">项目名：</div>
                                <input type="text" name="borrowName" id="borrowName" value="请输入项目名" class="search-value">
                            </div>

                            <div class="toolbor-module search">
                                <div class="formTit">还款人：</div>
                                <input type="text" name="userName" id="userName" value="请输入用户名" class="search-value">
                            </div>

                            <div class="toolbor-module search">
                                <div class="formTit">发布时间：</div>
                                <input class="_search-value" name="startDate" id="startDate" value="" onclick="change_picktime()"/>
                                <div style="height:22px;line-height:22px;float:left;margin:0 8px;"> 到 </div>
                                <input class="_search-value" name="endDate" id="endDate" value=""  onclick="change_picktime()"/>
                            </div>

                        </div>
                        <!--工具栏--}-->

                        <div id="main" class="clearfix">
                            <form action="" method="post">
                                <table class="data-list">
                                    <tr class="header">
                                        <td>ID</td>
                                        <td>项目名称</td>
                                        <td>项目金额</td>
                                        <td>年化收益</td>
                                        <td>借款期限</td>
                                        <td>发布时间</td>
                                        <td>还款人</td>
                                        <td>真实姓名</td>
                                        <td>联系方式</td>
                                        <td>应还金额</td>
                                        <td>实际还款金额</td>
                                        <td>还款时间</td>
                                        <td>还款状态</td>
                                        <td>操作</td>
                                    </tr>
                                    <#list list as item>
                                        <tr class="s">
                                            <td>${item.borrowId?c}</td>
                                            <td>${item.borrowName!''}</td>
                                            <td>${item.account?c}</td>
                                            <td>${item.apr!0}%</td>
                                            <td>${item.timeLimit!''}</td>
                                            <td>${item.publishDate?string("yyyy-MM-dd")}</td>
                                            <td>${item.userName!''}</td>
                                            <td>${item.realName!''}</td>
                                            <td>${item.phone!''}</td>
                                            <td>${item.repayMoney?c}</td>
                                            <td>${item.hasRepaidMoney?c}</td>
                                            <td>${item.repayDate?string("yyyy-MM-dd")}</td>
                                            <td>
                                                <#if item.status == 1 ||  item.status == 6>
                                                    待还款
                                                    <#elseif  item.status == 7>
                                                        部分还款
                                                        <#else>
                                                            还款成功
                                                </#if>
                                            </td>
                                            <td><a href="/admin/borrow/viewRepayment.html?borrowId=${item.borrowId?c}">查看还款计划</a></td>
                                        </tr>
                                    </#list>
                                </table>
                            </form>

                            <!--底部工具栏--{-->
                            <div id="bottomToolbar" class="clearfix">
                                <div class="other-tool">
                                    <dl class="refresh-data">
                                        <dt class="refresh-data-icon"></dt>
                                        <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                    </dl>
                                </div>

                                <!--翻页系统--{-->
                                <div class="container s_formPage">
                                    <#import "../../common/page.html" as pager>
                                        <@pager.pagination page=page url="${pageUrl}" map=param style="style1"  />
                                </div>
                                <!--翻页系统--}-->
                            </div>
                            <!--底部工具栏--}-->

                            <script>
                                var url = '?search=true';

                                function sousuo(){
                                    var sou = "";
                                    var userName = $("#userName").val();
                                    if (userName!=""&&userName!="请输入用户名"){
                                        sou += "&userName="+userName;
                                    }
                                    var borrowName = $("#borrowName").val();
                                    if (borrowName!=""&&borrowName!="请输入项目名"){
                                        sou += "&borrowName="+borrowName;
                                    }
                                    var startDate = $("#startDate").val();
                                    var endDate = $("#endDate").val();
                                    if (startDate!=null){
                                        sou += "&startDate="+startDate;
                                    }
                                    if (endDate!=null){
                                        sou += "&endDate="+endDate;
                                    }
                                    var fid = $("#fid").find(".open-selected").attr("data-value");
                                    if (fid!=null&&fid!=""&&fid!="undefine"){
                                        sou += "&fid="+fid;
                                    }
                                    var status = $("#status").find(".open-selected").attr("data-value");
                                    if (status!=null&&status!=""&&status!="undefine"){
                                        sou += "&status="+status;
                                    }
                                    if (sou!=""){
                                        location.href=url+sou;
                                    }
                                }

                            </script>
                        </div>
        </div>
    </div>
    <div class="mc-b"><#include "../foot.html"></div>
    <#include "../jsPage.html">
    </body>
</html>
